package com.example.personnel_management_system.service.Impl;

import com.example.personnel_management_system.entity.Positions;
import com.example.personnel_management_system.mapper.PositionsMapper;
import com.example.personnel_management_system.service.IPositionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionsServiceImpl implements IPositionsService {
    @Autowired
    private PositionsMapper positionsMapper;
    @Override
    public Integer insert(Positions positions) {
        return positionsMapper.insert(positions);
    }

    @Override
    public List<Positions> findByType(String pCategory) {
        return positionsMapper.findByType(pCategory);
    }

    @Override
    public Integer update(Positions positions) {
        return positionsMapper.update(positions);
    }

    @Override
    public List<Positions> findall() {
        return positionsMapper.findall();
    }

    @Override
    public Positions findBypId(Integer pID) {
        return positionsMapper.findBypId(pID);
    }

    @Override
    public List<String> findType() {
        return positionsMapper.findType();
    }
}
